package cn.itcast.zt.java8.disruptor;

import com.lmax.disruptor.ExceptionHandler;

/**
 * 自定义异常
 * @author zhangtian105
 * @date 2023/4/25
 * @apiNote
 */
public class NotifyEventHandlerException implements ExceptionHandler<NotifyEvent> {
    @Override
    public void handleEventException(Throwable throwable, long l, NotifyEvent notifyEvent) {
        throwable.fillInStackTrace() ;
        // 打印error日志
        // log.error("process data error sequence ==[{}] event==[{}] ,ex ==[{}]", sequence, event.toString(), throwable.getMessage());
    }

    @Override
    public void handleOnStartException(Throwable throwable) {
        // 打印error日志
        // log.error("start disruptor error ==[{}]!", throwable.getMessage());
    }

    @Override
    public void handleOnShutdownException(Throwable throwable) {
        // 打印error日志
        // log.error("shutdown disruptor error ==[{}]!", throwable.getMessage());
    }
}
